package com.itheima.test.inner;

public class inner05 {
    public static void main(String[] args) {
        InterImpl ii=new InterImpl();
        ii.show();
        new Inter(){
            @Override
            public void show() {
                System.out.println("匿名内部类");
            }
        }.show();
        Inter2 i=new Inter2() {
            @Override
            public void show1() {
                System.out.println("show1...");
            }

            @Override
            public void show2() {
                System.out.println("show2....");
            }
        };
        i.show1();
        i.show2();
    }
}
interface Inter{
    void show();
}
interface Inter2{
    void show1();
    void show2();
}
class InterImpl implements Inter{
    @Override
    public void show() {
        System.out.println("InterImpl");
    }
}